<?php

namespace app\company\validate;


class WarehouseStorageValidate extends BaseValidate
{
    public function __construct()
    {
        $rule = [
            'warehouse_id'      => 'require|integer',
            "warehouse_area_id" => "require|integer",
            "line"              => "require|integer",
            "layer"             => "require|integer",
            "row"               => "require|integer",
            "group"             => "require|integer",
        ];

        $message = [
            'warehouse_id.require'      => '仓库id必须',
            'warehouse_id.integer'      => '仓库id必须为整数',
            "warehouse_area_id.require" => '库区id必须',
            "warehouse_area_id.integer" => '库区id必须为整数',
            "line.require"              => '库位线必须',
            "line.integer"              => '库位线必须为整数',
            "layer.require"             => '库位层必须',
            "layer.integer"             => '库位层必须为整数',
            "row.require"               => '库位排必须',
            "row.integer"               => '库位排必须为整数',
            "group.require"             => '库位组必须',
            "group.integer"             => '库位组必须为整数',
        ];

        $scene = [
            'add' => ['warehouse_id', 'area_id', 'line', 'layer', 'row','group'],
        ];
        parent::__construct($rule, $message, $scene);
    }
}